package com.jianzhi.lib.log.data

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query

@Dao
interface LogDao {
    /**
     * 插入日志
     */
    @Insert
    fun insert(vararg logs: LogEntity)

    /**
     * 查询第一个日志
     */
    @Query("SELECT * FROM tb_log ORDER BY create_time ASC LIMIT 1")
    fun queryFirstLog(): LogEntity?

    /**
     * 删除日志
     *
     * @param logEntities
     */
    @Delete
    fun delete(vararg logs: LogEntity)
}